﻿using System;
using System.Collections.Generic;
using Be;
using System.ServiceModel;

namespace Bll {
 
    /// <summary>
    /// The IBookingService interface
    /// </summary>
    [ServiceContract]
    public interface IBookingService {

        /// <summary>
        /// Get all bookings
        /// </summary>
        /// <returns>All bookings</returns>
        [OperationContract]
        List<BeBooking> GetBookings();

        /// <summary>
        /// Get a booking from an id
        /// </summary>
        /// <param name="id">The id to get the booking from</param>
        /// <returns>The booking</returns>
        [OperationContract]
        BeBooking GetBookingFromId(int id);

        /// <summary>
        /// Get all bookings on a lesson
        /// </summary>
        /// <param name="lesson">The lesson to get the bookings from</param>
        /// <returns>The bookings</returns>
        [OperationContract]
        List<BeBooking> GetBookingsOnLesson(BeLesson lesson);

        /// <summary>
        /// Get all bookings i a specific week
        /// </summary>
        /// <param name="starttimes">The start day</param>
        /// <param name="days">The days from starttimes</param>
        /// <returns>The bookings</returns>
        [OperationContract]
        List<BeBooking> GetBookingsWeek(DateTime starttimes, int days);

        /// <summary>
        /// Get the suggestions from a booking
        /// on a specific day
        /// </summary>
        /// <param name="booking">The booking to get the suggestions from</param>
        /// <param name="day">The day to get the suggestions from</param>
        /// <returns>The suggestions</returns>
        /*[OperationContract]
        List<BeBooking> GetSuggestions(BeBooking booking, DateTime day);*/

        /// <summary>
        /// Save a booking
        /// </summary>
        /// <param name="booking">The booking to save</param>
        /// <returns>A message</returns>
        [OperationContract]
        string SaveBooking(BeBooking booking);

        /// <summary>
        /// Edit a booking
        /// </summary>
        /// <param name="booking">The booking to edit</param>
        /// <returns>A message</returns>
        [OperationContract]
        string EditBooking(BeBooking booking);

        /// <summary>
        /// Delete a booking
        /// </summary>
        /// <param name="booking">The booking to delete</param>
        /// <param name="role">The role of the user</param>
        /// <returns>A message</returns>
        [OperationContract]
        string DeleteBooking(BeBooking booking, string role);
    }
}